#ifndef __QUEUE_H
#define __QUEUE_H

#include <stdio.h>
#include "timer.h"
#include "utypes.h"



// called from isr, interrupts are disabled,
// can't call C library I/O functions, as they are BIOS based, not reentrant
extern int counter;


typedef struct {
    char buf[10];
    int in;
    int out;
    int cnt;
    int size;
} Queue;

void queueInit(Queue *q);
Bool queuePut(Queue *q, char c);
int queueGet(Queue *q);
Bool queueEmpty(Queue *q);
Bool queueFull(Queue *q);
void beep();

#endif /* __QUEUE_H */
